import request from "@/utils/request.js";
// 智慧乡村相关的接口

export function getScenicData() {
	return request.get("scenic/index", {}, {
		noAuth: true
	});
}


/**
 * 获取景区详情
 * @param number  id 
 */
export function getScenicInfo(id) {
	return request.get("guide/scenic/info", {
		id: id
	}, {
		noAuth: true
	});
}

/**
 * 获取点位详情
 * @param {number} id 
 */
export function getSpotData(id) {
	return request.get(`spot/info/${id}`, {}, {
		noAuth: true
	});
}

/**
 * 获取推荐关键词
 */
export function searchHotWords() {
	return request.get("guide/search/keyword", {}, {
		noAuth: true
	});
}

/**
 *  {
		keyWord,
		labelId,
		scenicId
	}
 * @param {*} params 
 */
export function spotSearch(params) {

	return request.get("spot/search", params, {
		noAuth: true
	});
}

/**
 * 获取所有的景点
 */
export function getSpots() {
	return request.get("guide/spot/list", {
		id: 1
	}, {
		noAuth: true
	})
}


/**
 * 获取景点标签
 */
export function getSpotLabels() {
	return request.get("spot/label/list", {}, {
		noAuth: true
	})
}


/**
 * 获取景区路线
 */
export function getScenicLine(id) {
	return request.get(`spot/line/${id}`, {}, {
		noAuth: true
	})
}


/**
 * 获取景区路线
 */
export function getScenicLines() {
	return request.get("guide/line/list", {}, {
		noAuth: true
	})
}

/**
 * 获取景区意见反馈
 */
export function getScenicFeedback() {
	return request.get("user/feedbackList", {}, {
		noAuth: false
	})
}

/**
 * 提交景区意见反馈 
 */
export function postScenicFeedback(feedback) {
	return request.post("user/feedback", feedback, {
		noAuth: false
	})
}

/**
 * h5导览地址获取
 * 
 */

export function getH5MapUrl() {
	return request.get("map/domain", {}, {
		noAuth: true
	})
}

/**
 * 获取门票列表
 */
export function getTickets() {
	return request.get("ticket/product/list", {}, {
		noAuth: true
	})
}

/**
 * 获取门票详情
 */
export function getTicket(id) {
	return request.get(`ticket/product/${id}`, {}, {
		noAuth: true
	})
}


/**
 * 获取活动列表
 */
export function getActivities() {
	return request.get("activity/list", {}, {
		noAuth: true
	})
}


/**
 * 获取活动详情
 */
export function getActivity(id) {
	return request.get(`activity/info/${id}`, {}, {
		
	})
}

export function makeorCancel(id){
	return request.get(`activity/makeOrCanel/${id}`,{},{
		
	})
}